package com.ecomemerce.app.comment.widgets

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Star
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Stable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp

@Composable
@Stable
fun CategoryGrid() {
    val categories = listOf("水果", "蔬菜", "水产", "冷冻", "肉类", "饮料", "零食", "日用品")
    LazyVerticalGrid(
        columns = GridCells.Fixed(4),
        modifier = Modifier
            .fillMaxWidth()
            .height(120.dp)
            .padding(8.dp)
    ) {
        items(8) { index ->
            Column(horizontalAlignment = Alignment.CenterHorizontally) {
                Icon(Icons.Filled.Star, contentDescription = "分类")
                Text("分类 $index", fontSize = 14.sp)
            }
        }
    }
}

